package com.awakensoftware.hunterserver.serverentities;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

@Entity
@Table(name = "ChestTemplates")
public class ChestTemplate extends ServerEntityBase {

	private static final long serialVersionUID = 9084207344292742106L;

	// Database fields and relationships
	@Id
	@GeneratedValue
	@Column(name = "id")
	private long id;
	
	@Column(length = 256, unique = false, name = "name")
	private String name;

	@ManyToMany
	private Set<TreasureTemplate> treasureTemplates = new HashSet<TreasureTemplate>();

	public long getId() {
		return id;
	}

	@Override
	public void setId(long id) {
		this.id = id;
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}

}
